#include "StdAfx.h"

#include "Windows.h"

#include "Common/System/Error.h"

#include "../../GUI/ExtractRes.h"

namespace FileManager
{

	CWindows::CWindows()
	{
	}

	CWindows::~CWindows()
	{
	}
using namespace Common;

CString CWindows::HResultToMessage(HRESULT errorCode)
{
	CString message;
	if (errorCode == E_OUTOFMEMORY)
	{
		message = Lang::LangStringSpec(IDS_MEM_ERROR, 0x0200060B);
	}
	else if (!System::Error::FormatMessage(errorCode, message))
	{
		message.Empty();
	}
	if (message.IsEmpty())
	{
		message = _T("Error");
	}
	return message;
}

} //namespace FileManager